package TwentyOne.Class.Define;

class Dept {
    private long deptno;
    private String dname;
    private String location;
    public Dept(){}
    public Dept(long deptno,String dname,String location){
        this.deptno=deptno;
        this.dname=dname;
        this.location=location;
    }
    public String getInfo(){
        return "[部门信息]部门编号："+this.deptno+"、部门名称："+this.dname+"、部门位置："+this.location;
    }
    public void setDeptno(long deptno){
        this.deptno=deptno;
    }
    public void setDname(String dname){
        this.dname=dname;
    }
    public void setLocation(String location){
        this.location=location;
    }
    public long GetDeptno(){
        return this.deptno;
    }
    public String GetDname(){
        return this.dname;
    }
    public String GetLocation(){
        return this.location;
    }
}
public class a1_Dept{
    public static void main(String[] args) {
        Dept dept=new Dept(10,"IT部门","北京");
        System.out.println(dept.getInfo());
    }
}

